#include "t_connect.h"

Connect::Connect(QModbusTcpClient * client)
{
    this->client = client;
}

void Connect::run()
{
    connect(client, &QModbusTcpClient::stateChanged, this, &Connect::t_onStateChanged);
}

void Connect::t_onStateChanged()
{
    if(client->state() == QModbusTcpClient::ConnectedState)
    {
        emit t_connect_send(client);
    }

}
